#include "Blocks/PistonBlock.h"

namespace PocketSurvival
{
    void PistonBlock::getCreativeValues(std::vector<int32_t> &blockVec)
    {
        blockVec.push_back(Terrain::MakeBlockValue(Index(), 0, SetMode(SetMaxExtension(0, 7), PistonMode::Pushing)));
        blockVec.push_back(Terrain::MakeBlockValue(Index(), 0, SetMode(SetMaxExtension(0, 7), PistonMode::Pulling)));
        blockVec.push_back(Terrain::MakeBlockValue(Index(), 0, SetMode(SetMaxExtension(0, 7), PistonMode::StrictPulling)));
    }

    void PistonBlock::getDropValues(int32_t oldValue, int32_t newValue, int32_t toolLevel, std::vector<BlockDropValue> &dropValues)
    {
    }

    BlockPlacementData PistonBlock::getPlacementValue(ComponentMiner *componentMiner, int32_t value, const TerrainRaycastResult &raycastResult)
    {
        BlockPlacementData result;
        result.value = 0;
        result.cellFace = raycastResult.cellFace;
        return result;
    }

    int32_t PistonBlock::getIndex()
    {
        return Index();
    }
    const std::string &PistonBlock::getBlockName()
    {
        static std::string blockName = "PistonBlock";
        return blockName;
    }

} // namespace PocketSurvival
